system.cpu.idle
: % Idle CPUsystem.cpu.system
: % System CPUsystem.cpu.user
: % User CPU
Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Explanation file: db.js | |
This code imports the mongoose library which allows to connect to a MongoDB database. | |
There are two URIs defined to connect to two different databases: MONGO_URI and MOBILE_URI. | |
Each URI contains connection information to a remote MongoDB database, including user credentials. | |
The connectDBs function uses the mongoose.createConnection method to create connections to these two | |
databases using the respective URIs. The useUnifiedTopology and useNewUrlParser options are set to enable the new | |
unified topology policy and use MongoDB's new URL parser, respectively. | |
The function returns an object that contains the connections to these two databases as qrCodeDb and userDB properties. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BASIC TKINTER CHEATSHEET | |
# Build basic GUIs with Python | |
from tkinter import * | |
from tkinter import scrolledtext | |
from tkinter import messagebox | |
from tkinter.ttk import Progressbar | |
from tkinter import filedialog | |
from tkinter import Menu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--paletteColor1 -----> --theme-palette-color-1 | |
--paletteColor2 -----> --theme-palette-color-2 | |
--paletteColor3 -----> --theme-palette-color-3 | |
--paletteColor4 -----> --theme-palette-color-4 | |
--paletteColor5 -----> --theme-palette-color-5 | |
--paletteColor6 -----> --theme-palette-color-6 | |
--paletteColor7 -----> --theme-palette-color-7 | |
--paletteColor8 -----> --theme-palette-color-8 | |
--fontFamily -----> --theme-font-family |
With Python
Dr. Yves J. Hilpisch | The Python Quants & The AI Machine
Python for Quant Finance Meetup, London, 16. November 2022
(short link to this Gist: http://bit.ly/pqf_risk)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**COMPLEX SPINNER** | |
#!/bin/bash | |
#Shows a spinner while another command is running. Randomly picks one of 12 spinner styles. | |
#@args command to run (with any parameters) while showing a spinner. | |
#E.g. ‹spinner sleep 10› | |
function shutdown() { | |
tput cnorm # reset cursor | |
} | |
trap shutdown EXIT |
NewerOlder